import httpRequest from "@/utils/axios";

const get = (url: string) =>
  httpRequest({
    url: url,
    method: "GET",
  });

const post = (url: string, params: any) =>
  httpRequest({
    url: url,
    method: "POST",
    data: params,
  });
/**
 * 教育经历
 * @author Godz
 */
export class eduExp {
  /** 查询全部 */
  static allGetTable = () => get(`/index3/get/eduExp`);
  /** 查询单个 */
  static getTableOne = (id: any) => get(`/index3/get/eduExpOne/${id}`);
  /** 修改外部表内容 */
  static editTable = (param: any) => post(`/index/post/editEduExp`, param);

  /** 查询全部详细 */
  static allGet = (params: any) => get(`/index3/get/eduPrim?deadNow=${params}`);
  /** 搜索内容详细 */
  static getImportant = (params: any) => get(`/queryPrim/${params}`);
  /** 查询单个详细 */
  static getOne = (id: any) => get(`/index3/get/eduPrimOne/${id}`);
  /** 增加一个详细 */
  static add = (param: any) => post(`/index3/post/addPrim`, param);
  /** 修改详细表内容 */
  static editDetail = (param: any) => post(`/index3/post/editPrim`, param);
  /** 删除单个详细 */
  static delete = (id: any) => get(`/index3/get/deletePrim/${id}`);
}

/**
 * 工作经历
 * @author Godz
 */
export class workExp {
  /** 查询全部 */
  static allGet = () => get(`/index3/get/workExp`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index3/get/workExpOne/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index3/post/addWork`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index/post/editWorkExp`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index3/get/deleteWork/${id}`);
}
/**
 * 身边人名言
 * @author Godz
 */
export class mindPeople {
  /** 查询全部 */
  static allGet = () => get(`/index3/get/mind`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index3/get/mindOne/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index3/post/addMind`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index/post/editMind`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index3/get/deleteMind/${id}`);
}
/**
 * 我的奋斗
 * @author Godz
 */
export class myStruggle {
  /** 查询全部 */
  static allGet = () => get(`/index3/get/dream`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index3/get/dreamOne/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index3/post/addDream`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index3/post/editDream`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index3/get/deleteDream/${id}`);
}
